<?php

namespace common\models\customset;

use Yii;

/**
 * This is the model class for table "custom_set".
 *
 * @property string $set_id
 * @property string $title
 * @property string $keyword
 * @property string $intro
 * @property string $addtime
 * @property string $top_pic
 * @property string $succ_info
 * @property string $err_info
 * @property string $detail
 * @property integer $limit_id
 * @property string $token
 * @property string $tel
 * @property string $address
 * @property string $longitude
 * @property string $latitude
 * @property string $is_pay
 * @property string $pay_name
 * @property string $price
 * @property string $follow
 * @property string $sms
 * @property string $fixphone
 * @property integer $versions
 */
class CustomSet extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'custom_set';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['title'], 'required'],
            [['detail', 'follow', 'sms'], 'string'],
            [['limit_id', 'is_pay', 'price', 'versions'], 'integer'],
            [['title'], 'string', 'max' => 30],
            [['keyword'], 'string', 'max' => 25],
            [['intro', 'top_pic', 'pay_name'], 'string', 'max' => 100],
            [['addtime'], 'string', 'max' => 10],
            [['succ_info', 'err_info'], 'string', 'max' => 35],
            [['token', 'tel', 'longitude', 'latitude', 'fixphone'], 'string', 'max' => 20],
            [['address'], 'string', 'max' => 80],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'set_id' => Yii::t('app', 'ID'),
            'title' => Yii::t('app', '标题'),
            'keyword' => Yii::t('app', '关键字'),
            'intro' => Yii::t('app', '简介'),
            'addtime' => Yii::t('app', '创建时间'),
            'top_pic' => Yii::t('app', 'Top Pic'),
            'succ_info' => Yii::t('app', '成功信息'),
            'err_info' => Yii::t('app', '错误信息'),
            'detail' => Yii::t('app', '详情'),
            'limit_id' => Yii::t('app', 'Limit ID'),
            'token' => Yii::t('app', 'Token'),
            'tel' => Yii::t('app', '手机号'),
            'address' => Yii::t('app', '地址'),
            'longitude' => Yii::t('app', '经度'),
            'latitude' => Yii::t('app', '纬度'),
            'is_pay' => Yii::t('app', '开启支付'),
            'pay_name' => Yii::t('app', '支付名称'),
            'price' => Yii::t('app', '支付价格'),
            'fixphone' => Yii::t('app', '传真'),
        ];
    }
}
